#!/usr/bin/perl 

use DBI;

print "Content-type: text/html\n\n";

$dbName = "KC_A222";

$dsn = 'dbi:mysql:'.$dbName;
$dbh = DBI->connect($dsn, 'knowcat', 'my4kc');

$sql = "select nameAuthor from Author";

$sth =  $dbh->prepare($sql);

$sth->execute || die "No se puede ejecutar la orden SQL";

while ($row = $sth->fetchrow_hashref){	
	print $row;
}

print "End to program";
